package com.ccb.testcenter.athena;

import java.io.IOException;
import java.io.InputStream;


import com.ccb.testcenter.configuration.Configuration;
import com.ccb.testcenter.configuration.XMLAthenaBuilder;
import com.ccb.testcenter.configuration.XPathParser;
import com.ccb.testcenter.configuration.io.Resources;
import com.ccb.testcenter.servicemaping.Segment;

/**
 * Hello world!
 *
 */
public class App 
{
	private final Configuration configuration=new Configuration();
	private static final App app = new App();
	
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
    }
    public static  void init(){
    	try {
			InputStream in=Resources.getResourceAsStream("struts2.xml");
			Segment s=new Segment();
			s.setRoot("1111");
			app.configuration.addSegment("com1",s);
			//XMLAthenaBuilder parser = new XMLAthenaBuilder(in,configuration);
		//	parser.parse();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    }
    public  void conver(){
    	System.out.println(app.configuration.getSegment("com1").getRoot());
    }
    public static App getInstance()
	{
		return App.app;
	}
}
